package com.github.kylewka.smartai.demo.mcp;

import com.github.kylewka.smartai.mcp.spring.annotation.McpFunction;
import com.github.kylewka.smartai.mcp.spring.annotation.McpParam;
import com.github.kylewka.smartai.mcp.spring.annotation.McpServerEndpoint;

/**
 * McpServerTool
 *
 * @author kylewka
 * @since 2025/4/24
 */
@McpServerEndpoint(value = "/mcp", version = "1.0.0", name = "天气查询服务")
public class McpServerTool {

    @McpFunction(name = "getWeather", description = "获取天气信息")
    public String getWeather(@McpParam(name = "city", description = "城市名称", required = true) String city) {
        return String.format("%s: 晴天，温度25℃", city);
    }

    @McpFunction(name = "getSpeciality", description = "获取城市特产")
    public String getSpeciality(@McpParam(name = "city", description = "城市名称", required = true) String city) {
        return String.format("%s特产是小笼包", city);
    }

}
